﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MakeCharacter.aspx.cs" Inherits="_2011DBProject.MakeCharacter" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<link rel=StyleSheet HREF='design1.css' type='text/css'>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>새벽 골프</title>
       <style type="text/css">
        .style1
        {
               width: 200px;
               height: 35px;
               font-family: 굴림체;
               font-size: 10pt;
               text-align: center;
               margin-right: 30px;
           }
           
        .style2
        {
               text-align: center;
               width: 184px;
           }
     </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
            <p align =left>
        <asp:Button ID="btnGoLogout" runat="server" onclick="btnGoLogout_onclick" 
            Text="☜ 로 그 아 웃" Width="150px" />
        <asp:Button ID="btnGoServer" runat="server" onclick="btnGoServer_onclick" 
            Text="☜ 서 버 선 택" Width="150px" />
        <asp:Button ID="btnGoCharacter" runat="server" onclick="btnGoCharacter_onclick" 
            Text="☜ 캐 릭 선 택" Width="150px" />
        </p>
    <div> 
        <center>
        <br />
        <asp:DataList ID="DataList1" runat="server" DataKeyField="SERVER_NO" 
            DataSourceID="SqlDataSource3" Visible="False">

       <Itemtemplate>
                <asp:Label ID="lblDLServer" runat="server" Text='<%# Eval("SERVER_NAME") %>' />
                </ItemTemplate>

        </asp:DataList>
            <br />

        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT &quot;SERVER_NO&quot;, &quot;SERVER_NAME&quot; FROM &quot;SERVER&quot; WHERE (&quot;SERVER_NO&quot; = :SERVER_NO)">
            <SelectParameters>
                <asp:SessionParameter Name="SERVER_NO" SessionField="SERVER" Type="Decimal" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:Label ID="lblAccount" runat="server" Font-Bold="True" Font-Size="Medium" 
            ForeColor="#FFFF99" Text="이름없음"></asp:Label>
&nbsp;님의 <asp:Label ID="lblServer" runat="server" Font-Bold="True" Font-Size="Medium" 
            ForeColor="#FFFF99" Text="서버선택안됨"></asp:Label>
&nbsp;서버 캐릭터 리스트<br />
            <br />
            <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
            <HeaderTemplate>
                <table class=normalTable width=300>
                    <tr height=35>
                        <td><font color="white">캐릭터명</font></td>
                        <td><font color="white">레벨</font></td>
                        <td><font color="white">경험치</font></td>
                        <td><font color="white">모델</font></td>
                    </tr>            
            </HeaderTemplate>
            <ItemTemplate>
            <tr height=35>
                <td><%# Eval("CHARACTER_NAME") %></td>            
                <td><%# Eval("LVL") %></td>            
                <td><%# Eval("EXP_TO_NEXT_LEVEL") %></td>            
                <td><%# Eval("MODEL_ID") %></td>            
            </tr>
            </ItemTemplate>
            <FooterTemplate>
            </table></FooterTemplate>
            </asp:Repeater>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                
                SelectCommand="SELECT &quot;CHARACTER_NAME&quot;, &quot;LVL&quot;, &quot;MODEL_ID&quot;, &quot;EXP_TO_NEXT_LEVEL&quot; FROM &quot;CHARACTER&quot; WHERE ((&quot;ACCOUNT_ID&quot; = :ACCOUNT_ID) AND (&quot;SERVER_NO&quot; = :SERVER_NO) AND (&quot;TITLE_NO&quot; &lt;&gt; :TITLE_NO))">
                <SelectParameters>
                    <asp:SessionParameter Name="ACCOUNT_ID" SessionField="USER" Type="String" />
                    <asp:SessionParameter Name="SERVER_NO" SessionField="SERVER" Type="Decimal" />
                    <asp:Parameter DefaultValue="9" Name="TITLE_NO" Type="Decimal" />
                </SelectParameters>
            </asp:SqlDataSource>
            <br />
            <br />
            <br />
            <br />
            <br />
            새로운 캐릭터 생성<br />
            <br /><asp:Panel ID="Panel1" runat="server" DefaultButton="makeBtn">
        <table style="width: 420px; margin-left: 0px;" border=1 cellpadding="0" 
                cellspacing="0" >
            <tr>
                <td class="style1">
                    캐릭터명</td>
                <td class="style2">
                    <asp:TextBox ID="txtCharacterName" runat="server" Width="150px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    남 / 여</td>
                <td class="style2">
                    <center><asp:RadioButtonList ID="RadioButtonList1" runat="server" Width="143px" 
                        RepeatColumns="2" AutoPostBack="True"
                        onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" 
                        ontextchanged="RadioButtonList1_TextChanged" Height="20px">
                        <asp:ListItem Value="M">남자</asp:ListItem>
                        <asp:ListItem Value="F">여자</asp:ListItem>
                    </asp:RadioButtonList>
                   </center>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    모 델 명</td>
                <td class="style2">
                    <asp:DropDownList ID="DropDownListM" runat="server" Height="26px" 
                        style="margin-left: 0px" Width="142px" Visible="False">
                        <asp:ListItem>벨제</asp:ListItem>
                        <asp:ListItem>보턴</asp:ListItem>
                        <asp:ListItem>제그문트</asp:ListItem>
                        <asp:ListItem>알버스</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownListF" runat="server" Height="26px" 
                        style="margin-left: 0px" Width="142px" Visible="False">
                        <asp:ListItem>엠다</asp:ListItem>
                        <asp:ListItem>샤링</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>       
        </table></asp:Panel>
            <br />
            <asp:Button ID="makeBtn" runat="server" Text="지금 생성하기!" 
                Width="282px" onclick="makeBtn_Click" />
            <br />
            <br />
            <br />
            <br />
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
                insertcommand="Insert Into [SERVER] ([SERVER_NO], [SERVER_NAME]) VALUES (@SERVER_NO, @SERVER_NAME)" 
                SelectCommand="SELECT * FROM &quot;CHARACTER&quot;">
            </asp:SqlDataSource>

            <br />
            <br />
            <br />
            <br />
        </div> 
<div> 
    </center>
</div> 
</div>
</form>
</body>
</html>
